var gemCounter = 0

while !isBlocked {
    moveForward()
    collectGem()
    
    gemCounter += 1
}